package ling.common.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

public interface IUpdatedEntity<T extends Comparable<T> & Serializable> {
    public T getUpdatedId();

    public void setUpdatedId(T id);

    public Date getUpdatedTime();
    public void setUpdatedTime(Date date);

    @Data
    public static class LongId extends IdEntity.LongId implements IUpdatedEntity<Long>{
        /**
         * 更新者
         */
        private Long updatedId;


        /**
         * 更新时间
         */
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date updatedTime;
    }
}
